<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: DrObject.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.8 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function() { init_codefold(0); });
/* @license-end */
</script>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="headertitle"><div class="title">DrObject.h</div></div>
</div><!--header-->
<div class="contents">
<a href="DrObject_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span> </div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="preprocessor">#include &lt;<a class="code" href="exports_8h.html">drogon/exports.h</a>&gt;</span></div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="preprocessor">#include &lt;<a class="code" href="DrClassMap_8h.html">drogon/DrClassMap.h</a>&gt;</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="preprocessor">#include &lt;string&gt;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &lt;type_traits&gt;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="preprocessor">#ifdef _MSC_VER</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span><span class="preprocessor">#pragma warning(disable : 4250)</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span> </div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespacedrogon.html">drogon</a></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno">   28</span>{</div>
<div class="foldopen" id="foldopen00033" data-start="{" data-end="};">
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObjectBase.html">   33</a></span><span class="keyword">class </span><a class="code hl_define" href="exports_8h.html#a00d0a001c2dd03906272e00b0598182e">DROGON_EXPORT</a> <a class="code hl_class" href="classdrogon_1_1DrObjectBase.html">DrObjectBase</a></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span>{</div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span>  <span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00041" data-start="{" data-end="}">
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObjectBase.html#a3b6f9f93fce1cb61c43bebea00b77582">   41</a></span>    <span class="keyword">virtual</span> <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1DrObjectBase.html#a3b6f9f93fce1cb61c43bebea00b77582">className</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span>        <span class="keyword">static</span> <span class="keyword">const</span> std::string name{<span class="stringliteral">&quot;DrObjectBase&quot;</span>};</div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>        <span class="keywordflow">return</span> name;</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span>    }</div>
</div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span> </div>
<div class="foldopen" id="foldopen00050" data-start="{" data-end="}">
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObjectBase.html#a847a57ab1e5cac6e70a910ae5e3f759b">   50</a></span>    <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="classdrogon_1_1DrObjectBase.html#a847a57ab1e5cac6e70a910ae5e3f759b">isClass</a>(<span class="keyword">const</span> std::string &amp;class_name)<span class="keyword"> const</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>        <span class="keywordflow">return</span> (className() == class_name);</div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>    }</div>
</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span> </div>
<div class="foldopen" id="foldopen00055" data-start="{" data-end="}">
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObjectBase.html#a3a57e74527aea2d71d9f471b39c70d1b">   55</a></span>    <span class="keyword">virtual</span> <a class="code hl_function" href="classdrogon_1_1DrObjectBase.html#a3a57e74527aea2d71d9f471b39c70d1b">~DrObjectBase</a>()</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>    {</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>    }</div>
</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>};</div>
</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00061" data-start="{" data-end="};">
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="structdrogon_1_1isAutoCreationClass.html">   61</a></span><span class="keyword">struct </span><a class="code hl_struct" href="structdrogon_1_1isAutoCreationClass.html">isAutoCreationClass</a></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>{</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>    <span class="keyword">template</span> &lt;<span class="keyword">class</span> C&gt;</div>
<div class="foldopen" id="foldopen00064" data-start="{" data-end="}">
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="structdrogon_1_1isAutoCreationClass.html#a6c0814b7e55ff4e0abd1a1a8478f92fe">   64</a></span>    <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keyword">auto</span> <a class="code hl_function" href="structdrogon_1_1isAutoCreationClass.html#a6c0814b7e55ff4e0abd1a1a8478f92fe">check</a>(C *) -&gt; std::enable_if_t&lt;</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>        std::is_same_v&lt;<span class="keyword">decltype</span>(C::isAutoCreation), <span class="keyword">const</span> <span class="keywordtype">bool</span>&gt;,</div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span>        <span class="keywordtype">bool</span>&gt;</div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span>    {</div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>        <span class="keywordflow">return</span> C::isAutoCreation;</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span>    }</div>
</div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>    <span class="keyword">template</span> &lt;<span class="keyword">typename</span>&gt;</div>
<div class="foldopen" id="foldopen00072" data-start="{" data-end="}">
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="structdrogon_1_1isAutoCreationClass.html#ae0db5eb096784f11923d08678987bfe5">   72</a></span>    <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_function" href="structdrogon_1_1isAutoCreationClass.html#ae0db5eb096784f11923d08678987bfe5">check</a>(...)</div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>    {</div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>        <span class="keywordflow">return</span> <span class="keyword">false</span>;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    }</div>
</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span> </div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="structdrogon_1_1isAutoCreationClass.html#a296ac76be7db21439056b6549def15c2">   77</a></span>    <span class="keyword">static</span> <span class="keyword">constexpr</span> <span class="keywordtype">bool</span> <a class="code hl_variable" href="structdrogon_1_1isAutoCreationClass.html#a296ac76be7db21439056b6549def15c2">value</a> = <a class="code hl_function" href="structdrogon_1_1isAutoCreationClass.html#a6c0814b7e55ff4e0abd1a1a8478f92fe">check&lt;T&gt;</a>(<span class="keyword">nullptr</span>);</div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>};</div>
</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span> </div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="foldopen" id="foldopen00085" data-start="{" data-end="};">
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObject.html">   85</a></span><span class="keyword">class </span><a class="code hl_class" href="classdrogon_1_1DrObject.html">DrObject</a> : <span class="keyword">public</span> <span class="keyword">virtual</span> <a class="code hl_class" href="classdrogon_1_1DrObjectBase.html">DrObjectBase</a></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>{</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>  <span class="keyword">public</span>:</div>
<div class="foldopen" id="foldopen00088" data-start="{" data-end="}">
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObject.html#af9339c889b7564b0222b25f42d5a07f1">   88</a></span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1DrObject.html#af9339c889b7564b0222b25f42d5a07f1">className</a>()<span class="keyword"> const override</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>        <span class="keywordflow">return</span> alloc_.className();</div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>    }</div>
</div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span> </div>
<div class="foldopen" id="foldopen00093" data-start="{" data-end="}">
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObject.html#af230f756b629164dce22b02d218525c1">   93</a></span>    <span class="keyword">static</span> <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="classdrogon_1_1DrObject.html#af230f756b629164dce22b02d218525c1">classTypeName</a>()</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>    {</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>        <span class="keywordflow">return</span> alloc_.className();</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>    }</div>
</div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span> </div>
<div class="foldopen" id="foldopen00098" data-start="{" data-end="}">
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObject.html#a51a4b49229662565393999a573549d91">   98</a></span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="classdrogon_1_1DrObject.html#a51a4b49229662565393999a573549d91">isClass</a>(<span class="keyword">const</span> std::string &amp;class_name)<span class="keyword"> const override</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span><span class="keyword">    </span>{</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>        <span class="keywordflow">return</span> (<a class="code hl_function" href="classdrogon_1_1DrObject.html#af9339c889b7564b0222b25f42d5a07f1">className</a>() == class_name);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    }</div>
</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>  <span class="keyword">protected</span>:</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>    <span class="comment">// protect constructor to make this class only inheritable</span></div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObject.html#a40297265c7f2318938e4fb159b26aa7b">  105</a></span>    <a class="code hl_function" href="classdrogon_1_1DrObject.html#a40297265c7f2318938e4fb159b26aa7b">DrObject</a>() = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"><a class="line" href="classdrogon_1_1DrObject.html#a86f55fd2a033d31e1811e60a525c33ad">  106</a></span>    <a class="code hl_function" href="classdrogon_1_1DrObject.html#a86f55fd2a033d31e1811e60a525c33ad">~DrObject</a>() <span class="keyword">override</span> = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno">  108</span>  <span class="keyword">private</span>:</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>    <span class="keyword">class </span>DrAllocator</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>    {</div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>      <span class="keyword">public</span>:</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>        DrAllocator()</div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span>        {</div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span>            registerClass&lt;T&gt;();</div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span>        }</div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span> </div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>        <span class="keyword">const</span> std::string &amp;className()<span class="keyword"> const</span></div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span><span class="keyword">        </span>{</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>            <span class="keyword">static</span> std::string className =</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>                <a class="code hl_function" href="classdrogon_1_1DrClassMap.html#a3479980ccf7edf6b886a02a29af181e4">DrClassMap::demangle</a>(<span class="keyword">typeid</span>(T).name());</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>            <span class="keywordflow">return</span> className;</div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>        }</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>        <span class="keyword">template</span> &lt;<span class="keyword">typename</span> D&gt;</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span>        <span class="keywordtype">void</span> registerClass()</div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>        {</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>            <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (std::is_default_constructible&lt;D&gt;::value)</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>            {</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span>                <a class="code hl_function" href="classdrogon_1_1DrClassMap.html#a83dfe0e7bbf366d42bafa4950dc04d1a">DrClassMap::registerClass</a>(</div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>                    className(),</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span>                    []() -&gt; <a class="code hl_class" href="classdrogon_1_1DrObjectBase.html">DrObjectBase</a> * { <span class="keywordflow">return</span> <span class="keyword">new</span> T; },</div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span>                    []() -&gt; std::shared_ptr&lt;DrObjectBase&gt; {</div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>                        <span class="keywordflow">return</span> std::make_shared&lt;T&gt;();</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>                    });</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>            }</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>            <span class="keywordflow">else</span> <span class="keywordflow">if</span> <span class="keyword">constexpr</span> (<a class="code hl_struct" href="structdrogon_1_1isAutoCreationClass.html">isAutoCreationClass&lt;D&gt;::value</a>)</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>            {</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>                <span class="keyword">static_assert</span>(std::is_default_constructible&lt;D&gt;::value,</div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>                              <span class="stringliteral">&quot;Class is not default constructable!&quot;</span>);</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>            }</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>        }</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>    };</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno">  144</span>    <span class="comment">// use static val to register allocator function for class T;</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>    <span class="keyword">static</span> DrAllocator alloc_;</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>};</div>
</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span> </div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span><span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span><span class="keyword">typename</span> DrObject&lt;T&gt;::DrAllocator DrObject&lt;T&gt;::alloc_;</div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno">  150</span> </div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span>}  <span class="comment">// namespace drogon</span></div>
<div class="ttc" id="aDrClassMap_8h_html"><div class="ttname"><a href="DrClassMap_8h.html">DrClassMap.h</a></div></div>
<div class="ttc" id="aclassdrogon_1_1DrClassMap_html_a3479980ccf7edf6b886a02a29af181e4"><div class="ttname"><a href="classdrogon_1_1DrClassMap.html#a3479980ccf7edf6b886a02a29af181e4">drogon::DrClassMap::demangle</a></div><div class="ttdeci">static std::string demangle(const char *mangled_name)</div><div class="ttdoc">demangle the type name which is returned by typeid(T).name().</div><div class="ttdef"><b>Definition</b> DrClassMap.h:116</div></div>
<div class="ttc" id="aclassdrogon_1_1DrClassMap_html_a83dfe0e7bbf366d42bafa4950dc04d1a"><div class="ttname"><a href="classdrogon_1_1DrClassMap.html#a83dfe0e7bbf366d42bafa4950dc04d1a">drogon::DrClassMap::registerClass</a></div><div class="ttdeci">static void registerClass(const std::string &amp;className, const DrAllocFunc &amp;func, const DrSharedAllocFunc &amp;sharedFunc=nullptr)</div><div class="ttdoc">Register a class into the map</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObjectBase_html"><div class="ttname"><a href="classdrogon_1_1DrObjectBase.html">drogon::DrObjectBase</a></div><div class="ttdoc">The base class for all drogon reflection classes.</div><div class="ttdef"><b>Definition</b> DrObject.h:34</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObjectBase_html_a3a57e74527aea2d71d9f471b39c70d1b"><div class="ttname"><a href="classdrogon_1_1DrObjectBase.html#a3a57e74527aea2d71d9f471b39c70d1b">drogon::DrObjectBase::~DrObjectBase</a></div><div class="ttdeci">virtual ~DrObjectBase()</div><div class="ttdef"><b>Definition</b> DrObject.h:55</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObjectBase_html_a3b6f9f93fce1cb61c43bebea00b77582"><div class="ttname"><a href="classdrogon_1_1DrObjectBase.html#a3b6f9f93fce1cb61c43bebea00b77582">drogon::DrObjectBase::className</a></div><div class="ttdeci">virtual const std::string &amp; className() const</div><div class="ttdoc">Get the class name</div><div class="ttdef"><b>Definition</b> DrObject.h:41</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObjectBase_html_a847a57ab1e5cac6e70a910ae5e3f759b"><div class="ttname"><a href="classdrogon_1_1DrObjectBase.html#a847a57ab1e5cac6e70a910ae5e3f759b">drogon::DrObjectBase::isClass</a></div><div class="ttdeci">virtual bool isClass(const std::string &amp;class_name) const</div><div class="ttdoc">Return true if the class name is 'class_name'</div><div class="ttdef"><b>Definition</b> DrObject.h:50</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObject_html"><div class="ttname"><a href="classdrogon_1_1DrObject.html">drogon::DrObject</a></div><div class="ttdef"><b>Definition</b> DrObject.h:86</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObject_html_a40297265c7f2318938e4fb159b26aa7b"><div class="ttname"><a href="classdrogon_1_1DrObject.html#a40297265c7f2318938e4fb159b26aa7b">drogon::DrObject::DrObject</a></div><div class="ttdeci">DrObject()=default</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObject_html_a51a4b49229662565393999a573549d91"><div class="ttname"><a href="classdrogon_1_1DrObject.html#a51a4b49229662565393999a573549d91">drogon::DrObject::isClass</a></div><div class="ttdeci">bool isClass(const std::string &amp;class_name) const override</div><div class="ttdoc">Return true if the class name is 'class_name'</div><div class="ttdef"><b>Definition</b> DrObject.h:98</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObject_html_a86f55fd2a033d31e1811e60a525c33ad"><div class="ttname"><a href="classdrogon_1_1DrObject.html#a86f55fd2a033d31e1811e60a525c33ad">drogon::DrObject::~DrObject</a></div><div class="ttdeci">~DrObject() override=default</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObject_html_af230f756b629164dce22b02d218525c1"><div class="ttname"><a href="classdrogon_1_1DrObject.html#af230f756b629164dce22b02d218525c1">drogon::DrObject::classTypeName</a></div><div class="ttdeci">static const std::string &amp; classTypeName()</div><div class="ttdef"><b>Definition</b> DrObject.h:93</div></div>
<div class="ttc" id="aclassdrogon_1_1DrObject_html_af9339c889b7564b0222b25f42d5a07f1"><div class="ttname"><a href="classdrogon_1_1DrObject.html#af9339c889b7564b0222b25f42d5a07f1">drogon::DrObject::className</a></div><div class="ttdeci">const std::string &amp; className() const override</div><div class="ttdoc">Get the class name</div><div class="ttdef"><b>Definition</b> DrObject.h:88</div></div>
<div class="ttc" id="aexports_8h_html"><div class="ttname"><a href="exports_8h.html">exports.h</a></div></div>
<div class="ttc" id="aexports_8h_html_a00d0a001c2dd03906272e00b0598182e"><div class="ttname"><a href="exports_8h.html#a00d0a001c2dd03906272e00b0598182e">DROGON_EXPORT</a></div><div class="ttdeci">#define DROGON_EXPORT</div><div class="ttdef"><b>Definition</b> exports.h:15</div></div>
<div class="ttc" id="anamespacedrogon_html"><div class="ttname"><a href="namespacedrogon.html">drogon</a></div><div class="ttdoc">Drogon Test is a minimal effort test framework developed because the major C++ test frameworks doesn'...</div><div class="ttdef"><b>Definition</b> Attribute.h:23</div></div>
<div class="ttc" id="astructdrogon_1_1isAutoCreationClass_html"><div class="ttname"><a href="structdrogon_1_1isAutoCreationClass.html">drogon::isAutoCreationClass</a></div><div class="ttdef"><b>Definition</b> DrObject.h:62</div></div>
<div class="ttc" id="astructdrogon_1_1isAutoCreationClass_html_a296ac76be7db21439056b6549def15c2"><div class="ttname"><a href="structdrogon_1_1isAutoCreationClass.html#a296ac76be7db21439056b6549def15c2">drogon::isAutoCreationClass::value</a></div><div class="ttdeci">static constexpr bool value</div><div class="ttdef"><b>Definition</b> DrObject.h:77</div></div>
<div class="ttc" id="astructdrogon_1_1isAutoCreationClass_html_a6c0814b7e55ff4e0abd1a1a8478f92fe"><div class="ttname"><a href="structdrogon_1_1isAutoCreationClass.html#a6c0814b7e55ff4e0abd1a1a8478f92fe">drogon::isAutoCreationClass::check</a></div><div class="ttdeci">static constexpr auto check(C *) -&gt; std::enable_if_t&lt; std::is_same_v&lt; decltype(C::isAutoCreation), const bool &gt;, bool &gt;</div><div class="ttdef"><b>Definition</b> DrObject.h:64</div></div>
<div class="ttc" id="astructdrogon_1_1isAutoCreationClass_html_ae0db5eb096784f11923d08678987bfe5"><div class="ttname"><a href="structdrogon_1_1isAutoCreationClass.html#ae0db5eb096784f11923d08678987bfe5">drogon::isAutoCreationClass::check</a></div><div class="ttdeci">static constexpr bool check(...)</div><div class="ttdef"><b>Definition</b> DrObject.h:72</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.8
</small></address>
</body>
</html>
